create table stu2(
    id int primary key auto_increment,
    name char(12) not null,
    gender enum('male','female') default 'male',
    class_id int,
    foreign key(class_id) references class(cid)
    on update cascade
    on delete cascade  # 尽量不用
)

create table class(
    cid int primary key auto_increment,
    cname char(12) not null,
    startd date
)
